gusucode.com > 耐品图片管理系统 标准版A > 耐品图片管理系统 标准版A/Admin_InfoCode.asp

    <!--#include file="Admin_ChkPurview.asp"-->
<%
'===============================================================
' 著作权号:中国国家版权局著作权登记号2004SR07385
' 版权所有:深圳市耐品科技开发有限公司 www.naipin.com
' 联系电话:0755-26611119 81234844 81234845
' 联系手机:13316911914
' 联系邮箱:naipin@naipin.com
'===============================================================

Action = Request.queryString("Action")
if Action = "Modify" then
	ErrCode = Trim(request.Form("ErrCode(0)"))
	For i = 1 to 20
		ErrCode = ErrCode&"||"&Trim(Request.Form("ErrCode("&i&")"))
	Next
	ErrCode = Replace(Replace(Replace(Replace(ErrCode,"'","&quot;"),Chr(34),"&quot;"),"<","&lt;"),">","&gt;")
	theCode = Trim(request.Form("theCode(0)"))
	For i = 1 to 20
		theCode = theCode&"||"&Trim(Request.Form("theCode("&i&")"))
	Next
	theCode = Replace(Replace(Replace(Replace(theCode,"'","&quot;"),Chr(34),"&quot;"),"<","&lt;"),">","&gt;")
	Set rs = Server.CreateObject("adodb.recordset")
	rs.Open "Select InfoCode From NT_Style Where IsDefault=1",Conn,1,3
	rs(0) = ErrCode&"@@"&theCode
	rs.Update
	rs.Close
	Set rs = Nothing
	Application.Lock()
	Application.Contents.Remove(Config.SystemUrl&"InfoCode")
	Application.UnLock()
	if Err then
		response.Write Err.Description
	else
		Behind.WriteSuccessMsg "模板修改成功!","Admin_Template.asp"
	end if
	Response.End
ElseIf Action = "Restore" Then
	Set rs = Conn.Execute("Select InfoCode from Nt_Style where TempName='系统备份模板'")
	InfoCode = rs(0)
	Set rs = Nothing
	Set rs = Server.CreateObject("adodb.recordset")
	rs.Open "Select InfoCode From NT_Style wher ID=1",Conn,1,3
	rs(0) = InfoCode
	rs.Update
	rs.Close
	Set rs = Nothing
	Application.Lock()
	Application.Contents.Remove(Config.SystemUrl&"InfoCode")
	Application.UnLock()
	Behind.WriteSuccessMsg "模板恢复成功!","Admin_Template.asp"
	Response.End
End if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<script language="javascript">
function Restore(){
	if(confirm("您真的要恢复该模板吗?"))
		window.location.replace('Admin_InfoCode.asp?Action=Restore');
	else
		return false;
}
</script>
<%
Behind.WriteHtmlHead
templateLink = "<a href='Admin_Template.asp' class='black'>模板列表</a> | <a href='Admin_Export.asp' class='black'>导入导出</a>"
Behind.WriteHtmlTop "网站模板总管理",templateLink

Set rs = Conn.Execute("select InfoCode from NT_Style Where IsDefault=1")
InfoCode = Split(rs(0),"@@")
ErrCode = Split(InfoCode(0),"||")
theCode = Split(InfoCode(1),"||")
%>
<table align="center" width="100%" border="0" cellspacing="1" cellpadding="0" class="border">
<form action="?Action=Modify" method="post">
  <%For i = 0 to Ubound(ErrCode)%>
  <tr class="tdbg">
    <td width="21%" height="25" align="right" valign="top">ErrCode(<%=i%>)</td>
    <td><input name="ErrCode(<%=i%>)" type="text" size="60" value="<%=ErrCode(i)%>"></td>
  </tr>
  <%Next%>
  <%For j = i to 20%>
  <tr class="tdbg">
    <td width="21%" height="25" align="right" valign="top">ErrCode(<%=j%>)</td>
    <td><input name="ErrCode(<%=j%>)" type="text" size="60" value=""></td>
  </tr>
  <%Next%>
  <%For i = 0 to Ubound(theCode)%>
  <tr class="tdbg">
    <td width="21%" height="25" align="right" valign="top">theCode(<%=i%>)</td>
    <td><input name="theCode(<%=i%>)" type="text" size="60" value="<%=theCode(i)%>"></td>
  </tr>
  <%Next%>
  <%For j = i to 20%>
  <tr class="tdbg">
    <td width="21%" height="25" align="right" valign="top">theCode(<%=j%>)</td>
    <td><input name="theCode(<%=j%>)" type="text" size="60" value=""></td>
  </tr>
  <%Next%>
  <tr class="tdbg">
    <td width="21%" height="22" align="right">&nbsp;</td>
    <td><input type="submit" name="Submit" value=" 修改模板 ">
      <input type="reset" name="Submit" value=" 恢复模板 " onClick="return Restore();">
    </td>
  </tr>
</form>
</table>
</body>
</html>
<%Set Netout = Nothing%>